<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-logic" prefix="logic"%>
<%@ taglib uri="/tags/core" prefix="c"%>

<p class="etiqueta_campo">
<br />
<html:form action="/saveInitCost" method="POST">
	<table border="0" align="center" cellpadding="2" cellspacing="2">
		<tr>
			<td align="center" colspan="100">						
				<html:submit styleClass="boton"><bean:message key="label.common.save"/></html:submit>	
				<html:button property="cancel" onclick="location.href = 'showVersionDetail.do'" styleClass="boton"><bean:message key="label.common.cancel"/></html:button>
			</td>
		</tr>
		<tr>
			<logic:iterate id="plants" name="plantList">
				<td style="width: 250px;" align="center"><bean:write name="plants" property="shortName"/> - <bean:write name="plants" property="description"/></td>
				<td>&nbsp;</td>
			</logic:iterate>
		</tr>
		<tr class="columnadatoPar">
			<logic:iterate id="initialCostGroup" name="PlantInitialCostForm" property="plantInicialCostList"  indexId="int_i">
				<td>
					<table width="100%" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
						<tr>
							<td class="titulocolumna">Tipo de Ma&iacute;z</td>
							<td class="titulocolumna">Ton.</td>
						</tr>
						<tr  class="columnadatoPar">
							<td align="left"><bean:write name="initialCostGroup" property="cornTypesView.code"/> - <bean:write name="initialCostGroup" property="cornTypesView.description"/></td>
							<td align="right"><bean:write name="initialCostGroup" property="unloadAmount"/></td>
						</tr>
						<tr>
							<td class="titulocolumna">Costos</td>
							<td class="titulocolumna">USD / Ton</td>
						</tr>
						<logic:iterate name="initialCostGroup" property="plantInitialCostViews" id="plantInitialCostView" indexId="int_j">
							<tr>
								<td class="<%=((int_j.intValue()%2)==0?"columnadatoPar":"columnadatoNon")%>"><c:out value="${plantInitialCostView.costElementView.costElementDescription}" /></td>
								<td class="<%=((int_j.intValue()%2)==0?"columnadatoPar":"columnadatoNon")%>"><input type="text" name='plantInicialCostList[<c:out value="${int_i}"/>].plantInitialCostViews[<c:out value="${int_j}"/>].amount' value='<c:out value="${plantInitialCostView.amount}"/>' onfocus="this.select();"  onkeyup="extractNumber(this,4,true);" class="columnanumero" size="13" /><br /></td>
							</tr>
						</logic:iterate>
					</table>
				</td>
				<td>&nbsp;</td>
				<c:if test="${initialCostGroup.lastCornType}">
					</tr>
					<tr class="columnadatoPar">
						<td colspan="100">&nbsp;</td>
					</tr>
					<tr class="columnadatoPar">
				</c:if>
			</logic:iterate>
		</tr>
	</table>
</html:form>
</p>